#pragma once
#include "test_base.h"
#include <boost/lockfree/queue.hpp>
#include <random>
#include <functional>

class queue_test : public test_base
{
public:
	queue_test(long loops) :test_base(loops),
							_input_gen(std::bind(std::uniform_int_distribution<int>(0, loops), std::mt19937()))
	{ _queue = new boost::lockfree::queue<int>(loops); }

	virtual ~queue_test(){delete _queue;}

protected:
	virtual void test_init() override;
	virtual void do_test() override;

private:
	std::function<int()>			_input_gen;
	static __declspec(thread) int	_random_toll;
	boost::lockfree::queue<int>*	_queue;
};

